package com.wgts.wgts.dagger.module;

/*
 *
 *
 *   data:2018/9/3015:18
 *
 */

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.IEditPersonMessageModel;
import com.wgts.wgts.mvp.model.ISendSMSCodeModel;
import com.wgts.wgts.mvp.model.imp.EditPersonMessageModel;
import com.wgts.wgts.mvp.model.imp.SendSMSCodeModel;
import com.wgts.wgts.mvp.presenter.IBindNewPhoneActivityPresenter;
import com.wgts.wgts.mvp.presenter.imp.BindNewPhoneActivityPresenter;
import com.wgts.wgts.mvp.view.IBindNewPhoneActivityView;
import com.wgts.wgts.netmodle.NetService;
import com.wgts.wgts.tools.CountDownTime;

import dagger.Module;
import dagger.Provides;

@Module
public class BindNewPhoneActivityModule {
    private IBindNewPhoneActivityView view;

    public BindNewPhoneActivityModule(IBindNewPhoneActivityView view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    public IBindNewPhoneActivityView provideView(){
        return view;
    }

    @ActivityScope
    @Provides
    public IEditPersonMessageModel provideModel(NetService netService){
        return new EditPersonMessageModel(netService);
    }

    @ActivityScope
    @Provides
    public ISendSMSCodeModel provideSmsModel(NetService netService, CountDownTime countDownTime){
        return new SendSMSCodeModel(netService, countDownTime);
    }

    @ActivityScope
    @Provides
    public IBindNewPhoneActivityPresenter providePresenter(IBindNewPhoneActivityView view, IEditPersonMessageModel model, ISendSMSCodeModel smsCodeModel){
        return new BindNewPhoneActivityPresenter(view, model, smsCodeModel);
    }
}
